import Vue from 'vue'
import App from '@/App.vue'
import router from '@router'
import store from '@store'
import './extension.js'
import './plugins/iview'

Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')



router.beforeEach((to, from, next) => {
    if (to.path.requireLess()) {
        next();
        return;
    }
    if (store.getters.me() == undefined) {
        router.replace('/login');
        return;
    }
    next();
})